package com.ibest.base.entity;

import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;
/**
 * canal获取到的binlog日志json数据格式
 * */
@Setter
@Getter
public class CanalBinlogBean implements Serializable {

    //数据
    private List<JSONObject> data;
    //数据库名称
    private String database;

    private long es;
    //递增，从1开始
    private int id;
    //是否是DDL语句
    private boolean isDdl;

    //表结构的字段类型
    private JSONObject mysqlType;
    //UPDATE语句，旧数据
    private String old;
    //主键名称
    private List<String> pkNames;
    //sql语句
    private String sql;

    private JSONObject sqlType;
    //表名
    private String table;

    private long ts;
    //(新增)INSERT、(更新)UPDATE、(删除)DELETE、(删除表)ERASE等等
    private String type;
}
